home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / sigwait.z / sigwait
Text File  |  1998-10-20  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))                                                          SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sigwait, sigwaitinfo, sigtimedwait - wait for queued signals (POSIX)
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttiiiimmmmeeeerrrrssss....hhhh>>>>
  14.  
  15.      iiiinnnntttt ssssiiiiggggwwwwaaaaiiiitttt((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, iiiinnnntttt ****ssssiiiigggg))));;;;
  16.      iiiinnnntttt ssssiiiiggggwwwwaaaaiiiittttiiiinnnnffffoooo((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, ssssiiiiggggiiiinnnnffffoooo____tttt ****vvvvaaaalllluuuueeee))));;;;
  17.      iiiinnnntttt ssssiiiiggggttttiiiimmmmeeeeddddwwwwaaaaiiiitttt((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, ssssiiiiggggiiiinnnnffffoooo____tttt ****vvvvaaaalllluuuueeee,,,, ttttiiiimmmmeeeessssppppeeeecccc____tttt ****ttttiiiimmmmeeeeoooouuuutttt))));;;;
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      The _s_i_g_w_a_i_t() function selects a pending signal from _s_e_t and returns it
  21.      in the storage pointed to by _s_i_g. If multiple signals from _s_e_t are
  22.      pending, then the one with the lowest numerical value is selected.  If no
  23.      signals in _s_e_t are pending then the call will block until one becomes
  24.      pending, The signals defined by _s_e_t must be blocked at the time of the
  25.      call to _s_i_g_w_a_i_t() in order to avoid conflicts with installed signal
  26.      handlers.  If the signals in _s_e_t are not blocked then the system will
  27.      either deliver the signal asynchronously, or _s_i_g_w_a_i_t() will return with
  28.      the signal. Users are advised to always block signals in _s_e_t to get
  29.      predictable results.
  30.  
  31.      The _s_i_g_w_a_i_t_i_n_f_o() call behaves the same as the _s_i_g_w_a_i_t() call if the
  32.      _v_a_l_u_e argument is NULL. If the _v_a_l_u_e argument is non-NULL, the
  33.      sigwaitinfo() function behaves the same as _s_i_g_w_a_i_t() except the selected
  34.      signal number is stored in the _s_i__s_i_g_n_o member, and the cause of the
  35.      signal is stored in the _s_i__c_o_d_e member. If any value was queued to the
  36.      selected signal, the first such queued value is dequeued and the value is
  37.      stored in the _s_i__v_a_l_u_e member of _v_a_l_u_e. The system resource used to queue
  38.      the signal shall be released and made available to queue other signals.
  39.      If no value is queued, the content of the _s_i__v_a_l_u_e member is undefined.
  40.      If no further signals are queued for the selected signal, the pending
  41.      indication for that signal shall be reset.
  42.  
  43.      The function _s_i_g_t_i_m_e_d_w_a_i_t() behaves the same as _s_i_g_w_a_i_t_i_n_f_o() except that
  44.      if none of the signals specified by _s_e_t are pending, _s_i_g_t_i_m_e_d_w_a_i_t() shall
  45.      wait for the time interval specified in the _t_i_m_e_s_p_e_c structure pointed to
  46.      by _t_i_m_e_o_u_t. If the _t_i_m_e_s_p_e_c structure pointed to by _t_i_m_e_o_u_t is zero-
  47.      valued and if none of the signals specified by _s_e_t are pending, then
  48.      _s_i_g_t_i_m_e_d_w_a_i_t() shall return immediately with an error. If _t_i_m_e_o_u_t is the
  49.      NULL pointer, the behavior is the same as _s_i_g_w_a_i_t_i_n_f_o()
  50.  
  51.      If any realtime signals (those in the range SSSSIIIIGGGGRRRRTTTTMMMMIIIINNNN to SSSSIIIIGGGGRRRRTTTTMMMMAAAAXXXX) are
  52.      pending, the lowest numbered signal shall be returned.  The order in
  53.      which realtime and nonrealtime signals are returned is nondeterministic.
  54.      The order in which multiple nonrealtime signals are returned is also
  55.      nondeterministic.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))                                                          SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))
  71.  
  72.  
  73.  
  74. SEE ALSO
  75.      _kkkk_iiii_llll_llll(2), _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2), _ssss_iiii_gggg_qqqq_uuuu_eeee_uuuu_eeee(3), _ssss_iiii_gggg_nnnn_aaaa_llll(5), _pppp_tttt_hhhh_rrrr_eeee_aaaa_dddd______ssss_iiii_gggg_mmmm_aaaa_ssss_kkkk(3P).
  76.  
  77. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  78.      Upon successful completion, _s_i_g_w_a_i_t() returns a 0.  Otherwise, it returns
  79.      an error number to indicate the error.
  80.  
  81.      Upon successful completion, _s_i_g_w_a_i_t_i_n_f_o() and _s_i_g_t_i_m_e_d_w_a_i_t() return the
  82.      selected signal number.  Otherwise, they return a -1 and set _e_r_r_n_o to
  83.      indicate the error number.
  84.  
  85.      If any of the conditions below occur, the error number will take on the
  86.      corresponding value:
  87.  
  88.      [EINTR]        The wait was interrupted by an unblocked, caught signal.
  89.  
  90.      If any of the following conditions occur, the _s_i_g_w_a_i_t() function shall
  91.      return the corresponding value:
  92.  
  93.      [EINVAL]       The _s_e_t argument contains an invalid or unsupported signal
  94.                     number.
  95.  
  96.      If any of the following conditions occur, the _s_i_g_t_i_m_e_d_w_a_i_t() function
  97.      shall return -1 and set _e_r_r_n_o to the corresponding value:
  98.  
  99.      [EAGAIN]       No signal specified by set was delivered within the
  100.                     specified timeout period.
  101.  
  102.      [EINVAL]       The _t_i_m_e_o_u_t argument specified a _t_v__n_s_e_c value less than
  103.                     zero or greater than or equal to 1 billion.
  104.  
  105. WWWWAAAARRRRNNNNIIIINNNNGGGG
  106.      The POSIX and System V signal facilities have different semantics.  Using
  107.      both facilities in the same program is ssssttttrrrroooonnnnggggllllyyyy ddddiiiissssccccoooouuuurrrraaaaggggeeeedddd and will
  108.      result in unpredictable behavior.
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.